feat(enrichment): add TODO/FIXME/HACK marker tracker analyzer - #3287
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-05 01:02:19 UTC
⏸️ Suggested Action - Manual Review Review summary Nits — 5 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3287 +/- ##
=======================================
Coverage 94.13% 94.13%
=======================================
Files 276 276
Lines 30236 30236
Branches 11016 11016
=======================================
Hits 28464 28464
Misses 1127 1127
Partials 645 645
🚀 New features to boost your workflow:
|
Closes #2016
What
A new local REES analyzer,
todoMarker, that surfacesTODO/FIXME/HACK/XXXmarkers a PR ADDS in comments — with the tag,file:line, and a truncated note — so a reviewer sees the change is shipping acknowledged-incomplete work. Pure compute over added lines, no network.Detection (stateless, precision-first, false-negative-biased)
A marker is reported only when both hold, so ordinary code and prose never false-positive:
todoidentifier, a// fixmelowercase note, or a private fieldthis.#todois never flagged.//,#,/*, or<!--at start-of-line or after whitespace, or a bare*only at the start of the trimmed line (the JSDoc continuation). Requiring a token boundary keepsthis.#TODO(a.precedes#) andbase * TODO(a*mid-expression) out; an uppercaseTODOused as a bare identifier in code is not matched.secret-log.ts'scodeOnly): a marker inside a string literal (const s = "// TODO") is not a hit.\bafter the tag keepsTODOS/XXXLout; the note drops a trailing*//-->and is truncated to 120 chars. A bare marker inside a multi-line block comment whose opener is on a previous line (a line with no lead-in of its own) is intentionally not matched — missing it is the safe direction, and the common* TODOcontinuation form still anchors on the leading*. Added lines only, line-cited via hunk headers, with the shared\ No newlineline-counter fix; findings capped (maxFindings: 25) per file and globally.Registration
Registered as a local descriptor (category
quality, costlocal, requires["files"]) with an inlinerender(), following theterminologydescriptor shape. All wiring updated:types.ts(TodoMarkerFinding+todoMarker?key),render.ts,analyzer-registry.test.ts, rootsrc/review/enrichment-analyzer-names.ts, roottest/unit/enrichment-wire.test.ts, and the generatedanalyzer-metadata.json/rees-analyzers.ts/.env.examplevianode scripts/generate-analyzer-metadata.mjs.Tests
review-enrichment/test/todo-marker.test.ts(14 tests) covers: each tag across comment styles (//,#,/*, JSDoc*,<!--) with notes, a bare marker with no note, uppercase-only (lowercase identifier/note andthis.#todonot flagged), comment-anchored (an uppercaseTODOin code,base * TODO, andarr.push(TODO)not flagged), a marker inside a string not flagged,TODOS/XXXLword-boundary rejection, trailing block-comment/HTML-close stripping, note truncation to the cap, added-line scanning with exact locations, added-lines-only with line-number accuracy across mixed hunks, the per-file cap +maxFindings: 0, the entrypoint's global cap across files, the no-files case, and the rendered brief section. Analyzer metadata is regenerated and committed.